<template>
	<view class="regBG" :style="{backgroundImage:`url(${indexBackgroundImage})`}">
		<view class="registerM">
			<form>
				<view class="uni-form-item uni-column">
					<view class="title">用户身份证号</view>
					<input type="text" :value="userReg.id" placeholder="请输入用户身份证号" @input="(e)=> {this.userReg.id = e.target.value}"/>
				</view>
				<view class="uni-form-item uni-column">
					<view class="title">用户名</view>
					<input type="text" :value="userReg.name" placeholder="请输入用户名" @input="(e)=> {this.userReg.name = e.target.value}"/>
				</view>
				<view class="uni-form-item uni-column">
					<view class="title">密码</view>
					<input type="password" :value="userReg.password" placeholder="请输入密码"  @input="(e)=> {this.userReg.password = e.target.value}"/>
				</view>
				<view class="uni-form-item uni-column">
					<view class="title">所在小区号</view>
					<input type="text" :value="userReg.location" placeholder="请输入小区号" @input="(e)=> {this.userReg.location = e.target.value}"/>
				</view>
				<view class="uni-form-item uni-column">
					<view class="title">楼号</view>
					<input type="text" :value="userReg.house" placeholder="请输入楼号" @input="(e)=> {this.userReg.house = e.target.value}"/>
				</view>
				<view class="uni-form-item uni-column">
					<view class="title">门牌号</view>
					<input type="text" :value="userReg.num" placeholder="请输入门牌号" @input="(e)=> {this.userReg.num = e.target.value}"/>
				</view>
				<view class="uni-form-item uni-column">
					<view class="title">小区验证文</view>
					<input type="text" :value="userReg.sign" placeholder="请输入小区验证文" @input="(e)=> {this.userReg.sign = e.target.value}"/>
				</view>
				<view class="uni-btn-v">
					<button type="default" class="quit" @click="quit()" >取 消</button>
					<button type="default" class="register" @click="register()" :loading="loaing">申 请</button>
				</view>
			</form>
		</view>
		
	</view>
</template>

<script>
	import indexBackgroundImage from "@/static/loginBG1.png"
	
	export default {
		data() {
			return {
				indexBackgroundImage:indexBackgroundImage,
				userReg: {
					
				},
				loaing: false,
			};
		},
		methods:{
			quit() {
				uni.navigateBack()
			},
			register() {
				this.loaing = true;
				setTimeout(()=> {
					this.loaing = false;
					uni.navigateBack()
				},1000)
				uni.showToast({
					title: '注册成功！',
					icon: 'success',
					durati1on: 1000
				});
				
				
			}
		}
	}
</script>

<style lang="scss" scope>
.regBG {
		// background: #C0C0C0;
		height: 100%;
		width: 100%;
		.registerM {
			opacity: 0.85;
			width: 500rpx;
			margin: 0 auto;
			position: relative;
			top: 20px;
			font-weight: bold;
			box-shadow: 3px 3px 9px #999;
			padding: 10rpx 30rpx;
			border-radius: 15rpx;
			background-color: #efeff4;
			.uni-form-item {
				input {
					    height: 25px;
					    padding: 7px 12px;
					    line-height: 25px;
					    font-size: 15px;
					    background: #fff;
				}
				.title {
					padding: 20rpx 0;
				}
			}
			.uni-btn-v {
				height: 50px;
				padding-top: 10px;
				button {
					float: left;
				}
				.quit {
					width: 40%;
				}
				.register {
					width: 50%;
					margin-left: 30rpx;
					padding: 0;
					background-color: #007AFF;
					color: #FFFFFF;
				}
			}
		}
		
		
	}
</style>
